package com.gxa.weixing.core.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.util.Date;

/**
 * @author lijianmin
 * @date 2022/01/05  23:24:38
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "tb_supplier")
@ApiModel(value = "供应商对象")
public class Supplier {

    /**
     * 供应商编号
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "supplier_id")
    @ApiModelProperty(name = "id", value = "供应商编号", dataType = "Long", example = "1")
    private Long id;

    /**
     * 供应商名称
     */
    @Column(name = "supplier_name")
    @ApiModelProperty(name = "goodsId", value = "供应商名称", dataType = "String", example = "山水果园")
    private String name;

    /**
     * 负责人
     */
    @Column(name = "supplier_principal")
    @ApiModelProperty(name = "principal", value = "负责人", dataType = "String", example = "胡歌")
    private String principal;

    /**
     * 负责人电话
     */
    @Column(name = "supplier_principal_phone")
    @ApiModelProperty(name = "principalPhone", value = "负责人电话", dataType = "String", example = "16688668866")
    private String principalPhone;

    /**
     * 供应商地址
     */
    @Column(name = "supplier_site")
    @ApiModelProperty(name = "site", value = "供应商地址", dataType = "String", example = "四川省成都市武侯区天府二街云华路111号")
    private String site;

    /**
     * 备注
     */
    @Column(name = "supplier_remarks")
    @ApiModelProperty(name = "remarks", value = "备注", dataType = "String", example = "备注")
    private String remarks;

    /**
     * 状态  (true正常/ false冻结)
     */
    @Column(name = "supplier_state")
    @ApiModelProperty(name = "state", value = "状态(true正常/ false冻结)", dataType = "Boolean", example = "true")
    private Boolean state;

    /**
     * 修改时间
     */
    @Column(name = "supplier_update_time")
    @ApiModelProperty(name = "updateTime", value = "修改时间", dataType = "Date", example = "修改时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date updateTime;

    /**
     * 入驻时间/添加供应商时间
     */
    @Column(name = "supplier_add_time")
    @ApiModelProperty(name = "addTime", value = "入驻时间", dataType = "Date", example = "入驻时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GTM+8")
    private Date addTime;
}
